<?php

class FacebookPage extends DataObjectDecorator {
    static $pageTypes;
    static $appID = null;

    function extraStatics() {
        return array(
            'db' => array(
                'Type' => "Varchar(255)",
                'Admins' => 'Text'
            ),
            'has_one' => array(
                'FBImage' => 'Image',
            )
        );
    }

    function updateCMSFields(FieldSet $fields) {
        $fields->addFieldToTab("Root.Content.Facebook", new ImageField('FBImage',_t('FB.IMAGE','Preview Image')));
        $fields->addFieldToTab("Root.Content.Facebook",  new DropdownField('Type',_t('FB.TYPE','Choose a Pagetype'),self::$pageTypes));

        if (self::$appID == null)
            $fields->addFieldToTab("Root.Content.Facebook", new TextField('Admins', 'Facebook Admin IDs'));
    }

    function AppID () {
        return self::$appID;
    }
}

?>
